package com.work.task.ssh;


import org.springframework.util.StringUtils;

public class SSHConfig {

    private String host;
    private int port;
    private String userName;
    private String password;

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public SSHConfig(){
        this.port = 22;
    }

    public boolean isAvailable(){
        if (!StringUtils.isEmpty(host) && !StringUtils.isEmpty(userName)&& !StringUtils.isEmpty(password)){
            return true;
        }
        return false;
    }
}
